import http from '@/utils/http'

// 查询缓存详细
export function getCache () {
  return http({
    url: '/monitor/cache/info',
    method: 'get'
  })
}

// 查询缓存名称列表
export function listCacheName () {
  return http({
    url: '/monitor/cache/listCacheName',
    method: 'get'
  })
}

// 删除一组缓存
export function clearCacheName(cacheName) {
  return http({
    url: '/monitor/cache/clearCacheName/' + cacheName,
    method: 'post'
  })
}

// 查询缓存详细
export function listCacheKey(cacheName) {
  return http({
    url: '/monitor/cache/listCacheKey/' + cacheName,
    method: 'get'
  })
}

// 删除缓存 cacheKey
export function clearCacheKey(cacheKey) {
  return http({
    url: '/monitor/cache/clearCacheKey/' + cacheKey,
    method: 'post'
  })
}

// 查询缓存详细
export function getValue(cacheName, cacheKey) {
  return http({
    url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
    method: 'get'
  })
}
